package com.we823.project.model.product;

import java.util.List;

import com.we823.project.model.repo.MaterialBomModel;

/**
 * 工序表
 * @author ZhangYinxian
 *
 */
public class ProcessModel2 implements Comparable<ProcessModel2>{

	private String name;
	private List<MaterialBomModel> materialBoms;
	/**
	 * 排序号
	 */
	private Integer orderid = 0;
	/**
	 * 层级优先
	 */
	private Integer deep = 0;
	
	
	public ProcessModel2() {}
	
	public ProcessModel2(String name, List<MaterialBomModel> materialBoms,
			Integer orderid) {
		this.name = name;
		this.materialBoms = materialBoms;
		this.orderid = orderid;
	}


	@Override
	public int compareTo(ProcessModel2 o) {
		if (o==null) {
			return -1;
		}
		return o.getOrderid() - this.getOrderid();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<MaterialBomModel> getMaterialBoms() {
		return materialBoms;
	}

	public void setMaterialBoms(List<MaterialBomModel> materialBoms) {
		this.materialBoms = materialBoms;
	}

	public Integer getOrderid() {
		return orderid;
	}

	public void setOrderid(Integer orderid) {
		this.orderid = orderid;
	}

	public Integer getDeep() {
		return deep;
	}

	public void setDeep(Integer deep) {
		this.deep = deep;
	}

}
